package demo.controller;

import java.time.LocalDateTime;

import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// controller 默认 单例 singleton 
// 配置为多例 @Scope("prototype")
@Scope("prototype")
@RestController
public class PrototypeController {
	
	private final String create = LocalDateTime.now().toString();
	
	@RequestMapping("/prototypeControllerInfo")
	public String info() {	
		return "create="+create+","+this.toString();
	}
	
	

}